projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
095859f
)
[IA64] Return ENOMEM if VPD allocation failed
author
Alex Williamson
<alex.williamson@hp.com>
Fri, 11 May 2007 19:07:04 +0000
(13:07 -0600)
committer
Alex Williamson
<alex.williamson@hp.com>
Fri, 11 May 2007 19:07:04 +0000
(13:07 -0600)
Usually ASSRET() is "(void)0". Therefore if VPD allocation
fails with xenheap shortage or fragmentation, NULL pointer
access occurs in vmx_final_setup_guest().
This patch fixes it.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
xen/arch/ia64/vmx/vmx_init.c
patch
|
blob
|
history
diff --git
a/xen/arch/ia64/vmx/vmx_init.c
b/xen/arch/ia64/vmx/vmx_init.c
index 01c0e4a8a449244ee740c78d7d9e3c1ed7d0a98f..3d463191e679afa86d9454b5bab0b3f62e07a7e7 100644
(file)
--- a/
xen/arch/ia64/vmx/vmx_init.c
+++ b/
xen/arch/ia64/vmx/vmx_init.c
@@
-299,6
+299,8
@@
vmx_final_setup_guest(struct vcpu *v)
vpd = alloc_vpd();
ASSERT(vpd);
+ if (!vpd)
+ return -ENOMEM;
v->arch.privregs = (mapped_regs_t *)vpd;
vcpu_share_privregs_with_guest(v);